﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sealight.Core.DataAdapter;

namespace Sealight.Core.Domain
{
   public class CityEntity
    {
       public virtual Guid CityID { get; set; }
       public virtual string Name { get; set; }
       public virtual IList<DistrictEntity> District { get; set; }
       public virtual city ToAdapter()
       {
           city data = new city
           {
               id=this.CityID,
               name = this.Name
           };
           if (this.District != null)
               data.district = (from d in this.District select d.ToAdapter()).ToList();
           return data;
       }
    }
}
